package com.dataseek.iot.sys.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @discription:
 * @author: Freya.Yan
 * @date: 2022/2/22
 */
@Component
public class MetadataConsts {

    //pg数据库信息
    public static String pgHost;
    public static Integer pgPort;
    public static String pgUsername;
    public static String pgPassword;


    @Value("${pg-datasource.host}")
    public void setPgHost(String host){
        MetadataConsts.pgHost=host;
    }

    @Value("${pg-datasource.port}")
    public void setPgPort(Integer port){
        MetadataConsts.pgPort=port;
    }

    @Value("${pg-datasource.username}")
    public void setPgUsername(String username){
        MetadataConsts.pgUsername=username;
    }

    @Value("${pg-datasource.password}")
    public void setPassword(String password){
        MetadataConsts.pgPassword=password;
    }

}
